window.onload = function(){
    layui.use(['jquery','layer'],function(){
        var $ = layui.jquery,
        layer = layui.layer;
        $('.update-order').on('click',function(){
            var form = $('.layui-form');
            $.ajax({
                'type':'POST',
                'url':'/order/update-order',
                'data':form.serialize(),
                'dataType':'json',
                'success':function(data)
                {
                    Utils.layer.msg(data.msg);
                    if(data.code == 200){
                        setTimeout(function () {
                            location.href = '/order/index';
                        },1200);
                    }

                }
            });

        });
    })
}